﻿<%@ Page Language="C#" AutoEventWireup="true" EnableEventValidation="false" CodeBehind="PaperList.aspx.cs" Inherits="DBA.Web.PaperManage.PaperList" %>
<%@ Register Assembly="AspNetPager"  Namespace="Wuqi.Webdiyer" TagPrefix="webdiyer" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" />

<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=7" />
<title></title>
<link href="/Styles/azure/style.css" rel="stylesheet" type="text/css" media="screen"/>
<link href="/Styles/css/core.css" rel="stylesheet" type="text/css" media="screen"/>
<link href="/Scripts/lhgdialog/skins/default.css" rel="stylesheet" type="text/css" />
<!--[if IE]>
<link href="themes/css/ieHack.css" rel="stylesheet" type="text/css" media="screen"/>
<![endif]-->
    <script src="/Scripts/jquery-1.7.1.js" type="text/javascript"></script>
<script src="/Scripts/jquery.bgiframe.js" type="text/javascript"></script>
<script src="/Scripts/dwz.core.js" type="text/javascript"></script>
<script src="/Scripts/dwz.ui.js" type="text/javascript"></script>
<script src="/Scripts/dwz.sortDrag.js" type="text/javascript"></script>
<script src="/Scripts/dwz.cssTable.js" type="text/javascript"></script>
<script src="/Scripts/dwz.stable.js" type="text/javascript"></script>
<script src="/Scripts/dwz.pagination.js" type="text/javascript"></script>
<script src="/Scripts/dwz.drag.js" type="text/javascript"></script>
<script src="/Scripts/dwz.barDrag.js" type="text/javascript"></script>
<script src="/Scripts/lhgdialog/lhgdialog.js" type="text/javascript"></script>
<script src="/Scripts/Public.js" type="text/javascript"></script>
<script src="/Scripts/date/WdatePicker.js" type="text/javascript"></script>
<!--
<script src="bin/dwz.min.js" type="text/javascript"></script>
-->

    <script type="text/javascript">
        var winAdd;
        function turnModifyPage(id) {
            winAdd = Public.ShowWindow("修改科研论文", "/PaperManage/PaperAdd.aspx?id=" + id + "&o=" + Math.random(), 700, 550);
        }

        function UpdateExcel() {
            Public.ShowWindow("上传教学信息", "../PaperManage/UploadPaperExcel.aspx?o=" + Math.random(), 440, 240, null, false, function () { Public.RefreshTable('AspNetPager1'); });
        } 

        function searchHandler() {
            __doPostBack("linkBtnSearch", "");
        }
        function initTable(_box) {
            var $p = $(_box || document);
            //tables
            $("table.table", $p).jTable();
            // css tables
            $('table.list', $p).cssTable();
        }

        function RefreshChildWin() {
            Public.RefreshTable("AspNetPager1");
            winAdd.dgWin.RefreshGrid();
        }

        function setSelectUser(id, name) {
            winAdd.dgWin.setSelectUser(id, name);
        }

        function ddd() {
            $("#dialog-form").dialog("open");
        }
        function addDate() {
            winAdd = Public.ShowWindow('添加科研论文', "/PaperManage/PaperAdd.aspx", 700, 550);
        }
        function DownLoadExcel() {
            Public.CallBack("lnkDownload");
        }
    </script>
    <script type="text/javascript">
        $(function () {
            //初始化
            DWZ.init("/dwz.frag.xml");
            initTable();
            //updatepanel回调完成后初始化表格
            Sys.WebForms.PageRequestManager.getInstance().add_endRequest(function () {
                initTable();
            });

        });
        //批量删除事件
        function deleteSelect() {
            var selectValue = $("#tableBody").getAllSelectedValue().join(",");
            if (selectValue != undefined && selectValue != '') {
                parent.alertMsg.confirm("是否删除选择的信息?", {
                    okCall: function () {
                        $("#hidDeleString").val(selectValue);
                        __doPostBack("linkBtnDeleSelect", "");
                    }
                });
            } else {
                parent.alertMsg.info("请选择要删除要的数据");
            }
        }
	</script>
</head>
<body style="background-color:#fff;">
    <form id="form1" runat="server">
<asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>    
    <div class="pageHeader">
      <div class="searchBar">
		<table class="searchContent">
			<tr>
				<td>
					论文名称：<asp:TextBox ID="txtps_Name" runat="server" style="width:100px;" CssClass="textInput"></asp:TextBox>
				</td>
                  <td>
					系：<asp:DropDownList ID="ddlXi" runat="server" Height="20px" 
                        Width="142px">
                    </asp:DropDownList>
				</td>
                <td>
					类型：  <asp:DropDownList ID="ddl_ps_Type" runat="server">
                                    <asp:ListItem Value="-1">-请选择-</asp:ListItem>
                                    <asp:ListItem Value="1">会议论文</asp:ListItem>
                                    <asp:ListItem Value="2">期刊论文</asp:ListItem>
                            </asp:DropDownList>
				</td>
                <td>
					级别：<asp:TextBox ID="txtps_Class" runat="server" style="width:100px;" CssClass="textInput"></asp:TextBox>
				</td>
                <td>
					发表期刊/会议名称： <input class="in_sty " id="txtps_PublicationName" type="text" runat="server" 
                                style="text-align:left;"/>
				</td>
			</tr>
            <tr>
              <td>
					发表时间： <input class="in_sty " id="txtps_BeginTime" type="text" runat="server" onfocus="WdatePicker({'dateFmt':'yyyy-MM'})"
                                style="text-align:left;"/>
				</td>
                 <td>
					 至： <input class="in_sty " id="txtps_EndTime" type="text" runat="server" onfocus="WdatePicker({'dateFmt':'yyyy-MM'})"
                                style="text-align:left;"/>
				</td>
                  <td>
					 收录类型： <input class="in_sty " id="txtSci" type="text" runat="server" 
                                style="text-align:left;"/>
				</td>
                   <td>
					 作者： <input class="in_sty " id="txtps_Person" type="text" runat="server" 
                                style="text-align:left;"/>
				</td>
            </tr>
		</table>
		<div class="subBar">
			<ul>
				<li><div class="buttonActive"><div class="buttonContent"><button  onclick="javascript:searchHandler();return false;">检索</button></div></div></li>
				<li style="display:none;"><a class="button" href="#" onclick="javascirpt:ddd();return false;"><span>高级检索</span></a></li>
			</ul>
		</div>
        <div style="display:none;">
                    <asp:UpdatePanel ID="UpdatePanel7" runat="server">
                    <ContentTemplate>
                    <asp:HiddenField ID="hdMaskMemberId" runat="server" />
                      <asp:LinkButton ID="linkBtnSearch" runat="server" onclick="linkBtnSearch_Click" ></asp:LinkButton>      
                      <asp:LinkButton ID="linkBtnMaskSearch" runat="server" onclick="linkBtnMaskSearch_Click" ></asp:LinkButton> 
                        <asp:HiddenField ID="hidDeleString" runat="server" />  
                      <asp:LinkButton ID="linkBtnDeleSelect" runat="server" onclick="linkBtnDeleSelect_Click" ></asp:LinkButton> 
                    </ContentTemplate>
                    </asp:UpdatePanel>
         </div>
       </div>     
	</div>
<div class="pageContent">
	<div class="panelBar">
		<ul class="toolBar">
			<li><a class="add" href="javascript:void(0);" onclick="javascript:addDate();return false;"><span>添加:</span></a></li>
			<li><a class="delete" href="javascript:void(0);" onclick="javascript:deleteSelect();return false;"><span>批量删除</span></a></li>
			<li class="line">line</li>
			<li><a class="icon" href="demo/common/dwz-team.xls"  onclick="javascript:DownLoadExcel();return false;" target="dwzExport" targetType="navTab" title="确实要导出这些记录吗?"><span>导出EXCEL</span></a></li>
		    <li><a class="icon" href="javascript:void(0);" onclick="javascript:UpdateExcel();return false;"  title="确实要导入这些记录吗?"><span>批量导入EXCEL</span></a></li>
        </ul>
	</div>
<asp:UpdatePanel runat="server" ID="UpdatePanel3">
<ContentTemplate>
    <asp:HiddenField ID="hdSaveID" runat="server" /> <%--保存选择的类型id--%>   

	<table class="table" width="100%" layoutH="138" >
		<thead>
			<tr>
                <th><input id="allChk" title="全选" onclick="javascript:$(this).SelectAll('tableBody');" value="all" type="checkbox" name="allChk"/></th>
                <th>论文名称</th>
                <th>论文类型</th>
                <th>发表期刊/会议名称</th>
                <th>级别</th>
                <th>期卷号</th>
                <th>发表时间</th>
                <th>收录类型</th>
                <th>权重</th>  
                <th>第一作者</th>             
                <th>第二作者</th>
                <th>第三作者</th>           
                <th>附件</th>
                <th>操作</th>
			</tr>
		</thead>
		<tbody id="tableBody">
        <asp:Repeater ID="replData" runat="server">
        <ItemTemplate>
			<tr target="ps_ID" rel="<%# Eval("ps_ID") %>">
                <td><INPUT id="Checkbox1" type="checkbox" name="chkson" onclick="javascript:$(this).singleSelected('allChk');" runat="server" class="checkbox" value='<%# Eval("ps_ID") %>'></td>
                <td title='<%# Eval("ps_PaperName")%>'><%# Eval("ps_PaperName").ToString().Length > 20 ? Eval("ps_PaperName").ToString().Substring(0, 19)+"...." : Eval("ps_PaperName").ToString()%></td>
                <td><%# Eval("ps_Type").ToString()=="1"?"会议论文":"期刊论文"%></td>
                <td title='<%# Eval("ps_PublicationName")%>'><%# Eval("ps_PublicationName").ToString().Length > 10 ? Eval("ps_PublicationName").ToString().Substring(0, 9) + "...." : Eval("ps_PublicationName").ToString()%></td>
                <td><%# Eval("ps_Class")%></td>
                <td><%# Eval("ps_Issue")%></td>
                <td><%# Eval("ps_date")%></td>
                <td><%# Eval("ps_Sci")%></td>
                <td><%# Eval("ps_Weight")%></td>
                <td><%# Eval("ps_person1")%></td>
                <td><%# Eval("ps_person2")%></td>              
                <td><%# Eval("ps_person3")%></td>
                 <td><%# Eval("attCount")%></td>
                <td><a href="javascript:void(0);" onclick="javascript:turnModifyPage($(this).getTabRowId());return false;">修改</a></td>
			</tr>
        </ItemTemplate>
        </asp:Repeater>
		</tbody>
	</table>
    <webdiyer:AspNetPager ID="AspNetPager1" runat="server" AlwaysShow="True" CustomInfoHTML="<div class='content'>第%CurrentPageIndex%/共%PageCount%页/共%RecordCount%条</div>"
                    FirstPageText="首页" LastPageText="末页" NextPageText="下页"
                    PrevPageText="上页" ShowCustomInfoSection="right" 
        ShowPageIndexBox="Never"  PageSize="10" Width="100%" CustomInfoClass="info"
        CssClass="paginator" onpagechanging="AspNetPager1_PageChanging" >
    </webdiyer:AspNetPager>
     </ContentTemplate>
                </asp:UpdatePanel>
                 <asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional">
    <ContentTemplate>
       <asp:LinkButton ID="lnkDownload" runat="server" onclick="lnkDownload_Click" ></asp:LinkButton>
    </ContentTemplate>
    <Triggers>
    <asp:PostBackTrigger ControlID="lnkDownload" />
    </Triggers>
    </asp:UpdatePanel>
    	
    </div>
   </form>
</body>
</html>

